#include <string.h>

#include "lib.h"

#include "noencryption.h"

#define SUPER Encryption

int32
NoEncryption::encode(uint8* src, int32 len)
{
	return encode(src, src, len);
}

int32
NoEncryption::encode(uint8* src, uint8* dst, int32 len)
{
	if (len > 0)
	{
		if (src != dst)
			memcpy(dst, src, len);

		return len;
	}

	return 0;
}

int32
NoEncryption::decode(uint8* src, int32 len)
{
	return decode(src, src, len);
}

int32
NoEncryption::decode(uint8* src, uint8* dst, int32 len)
{
	if (len > 0)
	{
		if (src != dst)
			memcpy(dst, src, len);

		return len;
	}

	return 0;
}
